#生成邮箱需要的加密url
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "boxuegu.settings")
from boxuegu import settings
from utils.secret import SecretOauth

def generate_url(email):
    # 1.email
    # data_dict = {'email':email}
    data_dict = email

    # 2. 加密
    secret_data = SecretOauth().dumps(data_dict)

    # 3. 拼接 链接
    verify_url = settings.EMAIL_ACTIVE_URL + secret_data

    # 4.返回去
    return verify_url

